<template>
  <TbTitle title="三、内部建设情况" />
  <TbTitle level="2" :title="'（一）本年度登记、备案事项变更情况 （' + examineYear + '年度系指1月1日至12月31日期间）'" />
  <table border="0" class="m-table-pdf">
    <tr>
      <td style="width: 25%;">变更事项</td>
      <td style="width: 25%;">是否涉及变更</td>
      <td style="width: 25%;">办理情况</td>
      <td style="width: 25%;">批准时间</td>
    </tr>
    <tr v-for="item in deptTableData">
      <td style="width: 25%;">{{ item.filingMatter }}</td>
      <td style="width: 25%;">{{ yesNoBool(item.filingType) }}</td>
      <td style="width: 25%;">{{ dictToVal(dict1, item.handleSituation) }}</td>
      <td style="width: 25%;">{{ item.capproveTime }}</td>
    </tr>
  </table>
</template>

<script setup lang="ts">
import TbTitle from '@/views/yearCheck/components/TbTitle.vue'
import { getDictAll } from '@/api/dict/index'
import { ref, getCurrentInstance, inject } from 'vue'
const { proxy } = getCurrentInstance();
const yesNoBool = proxy.$yesNoBool
// const yearlyRegister = ref([])
const { getDetailInfo } = inject('getDetailInfo')

let deptTableData = ref([])
let examineYear = ref()
const dict1 = ref([])

getDetailInfo(3).then(res => {
  examineYear = res.examineYear
  deptTableData.value = res.data.yearlyRegisterAddRequestList
})
let getDictInfo = () => {
  getDictAll('handle').then(res => {
    dict1.value = res.data
  })
}
const dictToVal = (dictList, val) => {
  for (let i = 0; i < dictList.length; i++) {
    if (val == dictList[i].id) {
      return dictList[i].name
    }
  }
}
getDictInfo()
</script>
<style lang="scss" scoped>
.msg-tip {
  padding: 20px 0;
  color: #000;

  font-family: '微软雅黑';
}

.msg-tip {
  padding: 20px 0;
  color: #000;
  font-family: '微软雅黑';
}
</style>
